<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;

Route::get('think', function () {
    return 'hello,ThinkPHP8!';
});

Route::get('hello/:name', 'index/hello');
Route::post("login","user/login");
Route::group(function(){
	Route::get("queryUser","user/index");
	Route::get("queryYddUser","yddUser/index");
	Route::get("queryRole","role/index");
	Route::get("queryPermission","permission/index");
	Route::post("addUser","user/create");
	Route::post("addYddUser","yddUser/create");
	Route::post("addRole","role/create");
	Route::post("addPermission","permission/create");
	Route::get("queryMenu","menu/index");
	Route::post("addMenu","menu/create");
	Route::get("userInfo","user/info");
	Route::get("delUser","user/delete");
	Route::get("delYddUser","yddUser/delete");
	Route::post("updateYddUser","yddUser/update");
	Route::post("updateUser","user/update");
	Route::get("findRoleByUserId","role/findByUserId");
	Route::get("delPermission","permission/delete");
	Route::post("updatePermission","permission/update");
	Route::get("delMenu","menu/delete");
	Route::post("updateMenu","menu/update");
	Route::get("delRole","role/delete");
	Route::post("updateRole","role/update");
	Route::get("findPermissionByRoleId","permission/findByRoleId");
	Route::get("findMenuByRoleId","menu/findByRoleId");
	Route::get("queryGoods","goods/index");
	Route::get("queryCategory","goods/queryCategory");
	Route::post("addCategory","goods/addCategory");
	Route::get("delCategory","goods/delCategory");
	Route::get("queryAddress","address/index");
	Route::get("querySku","sku/index");
	Route::get("queryOrder","order/index");
	Route::get("queryOrderInfo","order/info");
	Route::get("delOrder","order/delete");
	Route::get("querySwiper","swiper/index");
	Route::get("queryCart","cart/index");
	Route::post("addGoods","goods/create");
	Route::get("delGoods","goods/delete");
	Route::post("addSku","sku/create");
	Route::get("delSku","sku/delete");
	Route::post("updateSku","sku/update");
	Route::post("updateGoods","goods/update");
	Route::post("updateCategory","goods/updateCategory");
	Route::get("delAddress","address/delete");
	Route::post("addAddress","address/create");
	Route::post("updateAddress","address/update");
	Route::get("readGoods","goods/read");
	Route::get("findSkuByGoodsId","sku/findSkuByGoodsId");
	Route::post("addCart","cart/create");
	Route::get("delCart","cart/delete");
	Route::post("updateCart","cart/update");
	Route::get("findAddByUserId","address/findAddByUserId");
	Route::post("addOrder","order/create");
	Route::get("updateStateById","order/updateStateById");
})->middleware("check");
